package asteroids.entity.equipment;

import org.apache.log4j.Logger;

import asteroids.engine.GameState;
import asteroids.engine.Utils;
import asteroids.entity.Ship;

public class Dynamo extends Equipment
{
    Logger logger = Logger.getLogger(Dynamo.class);

    private double powerRegenRate;

    public Dynamo(Ship ship, double rate)
    {
        super(ship);
        powerRegenRate = rate;
    }

    public Dynamo(Ship ship)
    {
        this(ship, 2.5 / Utils.FRAMES_PER_SECOND);
    }

    @Override
    public void respawn()
    {
    }

    public void update(GameState state)
    {
        ship.modifyEnergyBy(powerRegenRate);
    }
}
